const Controller = require('egg').Controller;

class C extends Controller {
  async status() {
    const {ctx} = this;
    const socket = ctx.socket;
    const status_num = ctx.args[0];
    await this.app.model.Vps.update({status: 4, status_num},
        {where: {socket_id: socket.id}});
  }

  async vpsError() {
    const message = this.ctx.args[0];
    await this.ctx.service.saveError.save(message);
  }
}

module.exports = C;